package com.ldgk.pim.client.view.components;

import java.util.ArrayList;
import java.util.List;

import com.extjs.gxt.ui.client.data.BeanModel;
import com.extjs.gxt.ui.client.data.BeanModelFactory;
import com.extjs.gxt.ui.client.data.BeanModelLookup;
import com.extjs.gxt.ui.client.store.ListStore;
import com.extjs.gxt.ui.client.widget.grid.ColumnConfig;
import com.ldgk.pim.data.Place;

public class DistributionPage extends CustomGridContainer{
	
	public DistributionPage() {
		super("");
	}

	@Override
	protected List<ColumnConfig> buildGridColumnConfig() {
		List<ColumnConfig> configs = new ArrayList<ColumnConfig>();
		configs.add(buildDateConfig("data","Data",80));
		configs.add(buildNumberConfig("pocketNts", "Bolso", 50, Integer.class));
		configs.add(buildNumberConfig("mediumNts", "Medio", 50, Integer.class));
		configs.add(buildNumberConfig("whiteNts", "Branco", 50, Integer.class));
		configs.add(buildTextFieldConfig("details","Detalhes",60));
		return configs;
	}

	@Override
	protected void loadData(ListStore<BeanModel> gridStore) throws Exception {
		// TODO Auto-generated method stub
		
	}

	@Override
	protected BeanModel newModelInstance() {
		BeanModelFactory factory = BeanModelLookup.get().getFactory(Place.class);
		BeanModel data = factory.createModel(new Place());
		return data;
	}

	@Override
	protected void recordsCreatedOrChanged(List<BeanModel> list) throws Exception {
		// TODO Auto-generated method stub
		
	}

	@Override
	protected void recordsDeleted(List<BeanModel> list) throws Exception {
		// TODO Auto-generated method stub
		
	}
	
}
